/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "disposition")
@NamedQueries({
    @NamedQuery(name = "Disposition.findAll", query = "SELECT d FROM Disposition d"),
    @NamedQuery(name = "Disposition.findByIddisposition", query = "SELECT d FROM Disposition d WHERE d.iddisposition = :iddisposition"),
    @NamedQuery(name = "Disposition.findByDisposition", query = "SELECT d FROM Disposition d WHERE d.disposition = :disposition")})
public class Disposition implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "iddisposition")
    private Integer iddisposition;
    @Basic(optional = false)
    @Column(name = "disposition")
    private String disposition;
    @OneToMany(mappedBy = "disposition", fetch = FetchType.LAZY)
    private List<Curatorialelement> curatorialelementList;
    @OneToMany(mappedBy = "disposition", fetch = FetchType.LAZY)
    private List<Occurrenceelement> occurrenceelementList;

    public Disposition() {
    }

    public Disposition(Integer iddisposition) {
        this.iddisposition = iddisposition;
    }

    public Disposition(Integer iddisposition, String disposition) {
        this.iddisposition = iddisposition;
        this.disposition = disposition;
    }

    public Integer getIddisposition() {
        return iddisposition;
    }

    public void setIddisposition(Integer iddisposition) {
        this.iddisposition = iddisposition;
    }

    public String getDisposition() {
        return disposition;
    }

    public void setDisposition(String disposition) {
        this.disposition = disposition;
    }

    public List<Curatorialelement> getCuratorialelementList() {
        return curatorialelementList;
    }

    public void setCuratorialelementList(List<Curatorialelement> curatorialelementList) {
        this.curatorialelementList = curatorialelementList;
    }

    public List<Occurrenceelement> getOccurrenceelementList() {
        return occurrenceelementList;
    }

    public void setOccurrenceelementList(List<Occurrenceelement> occurrenceelementList) {
        this.occurrenceelementList = occurrenceelementList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (iddisposition != null ? iddisposition.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Disposition)) {
            return false;
        }
        Disposition other = (Disposition) object;
        if ((this.iddisposition == null && other.iddisposition != null) || (this.iddisposition != null && !this.iddisposition.equals(other.iddisposition))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Disposition[iddisposition=" + iddisposition + "]";
    }

}
